{HD: jquery}
<script type="text/javascript">
    var PUBLIC = '{HD: $smarty.const.__PUBLIC__}';
    var ROOT = '{HD: $smarty.const.__ROOT__}';
    var on = 0;
    {HD: if $smarty.session.username }
    on = 1;
    {HD: else}
    on = 0;
    {HD: /if}
</script>
<script>
            $(function() {
                var codeImg = $('#verify-img').attr('src');
                $('#verify-img').click(function() {
                    $(this).attr('src', codeImg + '&' + Math.random());
                })
            })
</script>
{HD: css file='common.css'}
{HD: js file='index.js'}
{HD: js file='top-bar.js'}
</head>
<body>
    <!-- top -->
    <div id='top-fixed'>
        <div id='top-bar'>
            <ul class="top-bar-left fl">
                <li><a href="http://www.houdunwang.com" target='_blank'>后盾顶尖后盾PHP培训</a></li>
                <li><a href="http://www.houdunwang.com" target='_blank'>后盾论坛</a></li>
            </ul>
            <ul class='top-bar-right fr' id='loginStatu'>
                {HD:php}if(isset($_SESSION['username'])):{HD:/php}
                <li class='userinfo'>
                    <a href="{HD: $smarty.const.__ROOT__}?c=Member" class='uname'> {HD:php}echo $_SESSION['username'] {HD:/php}</a>
                </li>
                <li style='color:#eaeaf1'>|</li>
                <li><a href="{HD: $smarty.const.__ROOT__}?c=Login&m=login_out">退出</a></li>
                {HD:php}else: {HD:/php}
                <li><a href="" class='login'>登录</a></li>
                <li style='color:#eaeaf1'>|</li>
                <li><a href="" class='register'>注册</a></li>
                {HD:php}endif; {HD:/php}
            </ul>

        </div>
        <!-- 提问搜索框 -->
        <div id='search'>
            <div class='logo'><a href="" class='logo'></a></div>
            <form action="{HD: $smarty.const.__ROOT__}?c=index&m=search" method='post'>
                <input type="text" name='searchCon' class='sech-cons'/>
                <input type="submit" class='sech-btn' value='开始查找'/>
            </form>
            <a href="{HD: $smarty.const.__ROOT__}?c=ask" class='ask-btn'>我要提问</a>
        </div>
        <!-- 提问搜索框结束 -->
    </div>
    <div style='height:110px'></div>
    <!----------导航条---------->
    <div id='nav_inc'>
        <div id='nav'>
            <ul class='list'>
                <li class='nav-sel'><a href="{HD: $smarty.const.__ROOT__}" class='home'>问答首页</a></li>
                <li class='nav-sel ask-cate'>
                    <a href="{HD: $smarty.const.__ROOT__}?c=list&cid=0" class='ask-list'><span>问题库</span><i></i></a>
                    <ul class='hidden'>
                        {HD: section loop=$topCate name=m}
                        <li>
                            <a href="{HD: $smarty.const.__ROOT__}?c=list&cid={HD: $topCate[m].cid}">{HD: $topCate[m].title}</a>
                        </li>
                        {HD: /section}
                    </ul>
                </li>
            </ul>
            <p class='total'>累计提问：{HD: $count.c}</p>
        </div>
    </div>
    <!----------注册框---------->
    <div id='register' class='hidden'>
        <div class='reg-title'>
            <p>欢迎注册后盾问答</p>
            <a href="" title='关闭' class='close-window'></a>
        </div>
        <div id='reg-wrap'>
            <div class='reg-left'>
                <ul>
                    <li><span>账号注册</span></li>
                </ul>
                <div class='reg-l-bottom'>
                    已有账号，<a href="" id='login-now'>马上登录</a>
                </div>
            </div>
            <div class='reg-right'>
                <form action="{HD: $smarty.const.__ROOT__}?c=Register&m=register" method='post' name='register'>
                    <ul>
                        <li>
                            <label for="reg-uname">用户名</label>
                            <input type="text" name='username' id='reg-uname'/>
                            <span id="reg-uname-span">2-14个字符：字母、数字或中文</span>
                        </li>
                        <li>
                            <label for="reg-pwd">密码</label>
                            <input type="password" name='pwd' id='reg-pwd'/>
                            <span id="reg-pwd-span">6-20个字符:字母、数字或下划线 _</span>
                        </li>
                        <li>
                            <label for="reg-pwded">确认密码</label>
                            <input type="password" name='pwded' id='reg-pwded'/>
                            <span id="reg-pwded-span">请再次输入密码</span>
                        </li>
                        <li>
                            <label for="reg-verify">验证码</label>
                            <input type="text" name='verify' id='reg-verify'/>
                            <img src="{HD: $smarty.const.__ROOT__}?c=Register&m=code" width='99' height='35' alt="验证码" id='verify-img'/>
                            <span  id="reg-code-span">请输入图中的字母或数字，不区分大小写</span>
                        </li>
                        <li class='submit'>
                            <input type="submit" value='立即注册' id='reg-submit'/>
                        </li>
                    </ul>
                </form>
            </div>
        </div>
    </div>

    <!----------登录框---------->	
    <div id='login' class='hidden'>
        <div class='login-title'>
            <p>欢迎您登录后盾问答</p>
            <a href="" title='关闭' class='close-window'></a>
        </div>
        <div class='login-form'>
            <span id='login-msg'></span>
            <!-- 登录FORM -->
            <form action="" method='post' name='login'>
                <ul>
                    <li>
                        <label for="login-acc">账号</label>
                        <input type="text" name='account' class='input' id='login-acc'/>
                    </li>
                    <li>
                        <label for="login-pwd">密码</label>
                        <input type="password" name='pwd' class='input' id='login-pwd'/>
                    </li>
                    <li class='login-auto'>
                        <label for="auto-login">
                            <input type="checkbox" checked='checked' name='auto'  id='auto-login'/>&nbsp;下一次自动登录
                        </label>
                        <a href="" id='regis-now'>注册新账号</a>
                    </li>
                    <li>
                        <a href="javascript:;" id='login-btn' ></a>
                    </li>
                </ul>
            </form>
        </div>
    </div>

    <!--背景遮罩--><div id='background' class='hidden'></div>